import type { PDFDocumentProxy } from 'pdfjs-dist'

export const usePdf2Html = () => {
  // 解析pdf
  const parsePDF = async () => {}

  // 转换pdf
  const transferPDF2Html = async (pdf: PDFDocumentProxy) => {
    // const numPages = pdf.numPages;
    // for (let i = 1; i <= numPages; i++) {
    //   const page = await pdf.getPage(i);
    // }
    console.error('敬请期待！')
  }

  // 保存html
  const saveHtml = async (fileName: string) => {}

  return {
    parsePDF,
    transferPDF2Html,
    saveHtml,
  }
}
